package com.yycwxt.modules.admin.shopcompare;

import com.yycwxt.common.ReturnResult;
import com.yycwxt.domain.SubCompare;
import com.yycwxt.modules.admin.subcompare.SubCompareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api
@RestController
@Validated
@RequestMapping("/shopcompares")
public class ShopCompareController {

    private ShopCompareService service;

    @Autowired
    public ShopCompareController(ShopCompareService service) {
        this.service = service;
    }

    @PostMapping()
    @ApiOperation("根据所选店铺查询")
    public ReturnResult getshopcompare(@RequestBody String[] shop){
        return ReturnResult.buildSuccessResult(service.shopcompare(shop));

    }
}
